package com.itheima.neibulei;

@FunctionalInterface//校验是否是函数式接口
public interface Lambdaa {
    void show();
}

class Demo11 {
    public static void main(String[] args) {

        method(() -> {
            System.out.println("lambda函数式编程实现方法");
        });

        method(new Lambdaa() {
            @Override
            public void show() {
                System.out.println("匿名内部类实现方法");
            }
        });
    }

    public static void method(Lambdaa lm) {
        lm.show();
    }
}